package com.stone;

import com.stone.util.NetworkUtil;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

@EnableConfigServer
@EnableEurekaClient
@SpringBootApplication
public class ConfigServerDemoApplication {

    public static void main(String[] args) {
        int port = NetworkUtil.getPort();
        new SpringApplicationBuilder(ConfigServerDemoApplication.class).properties("server.port=" + port).run(args);
    }

}
